home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / GCC 1.37.1r14 / usr / gcc-1.37.1r14 / (gcc-1.37.π) / machmode.def < prev    next >
Encoding:
Text File  |  1993-07-01  |  5.4 KB  |  128 lines  |  [TEXT/KAHL]

  1. /* This file contains the definitions and documentation for the
  2.    machine modes used in the the GNU compiler.
  3.    Copyright (C) 1987 Free Software Foundation, Inc.
  4.    Copyright (C) 1989, 1990 Apple Computer, Inc.
  5.  
  6. This file is part of GNU CC.
  7.  
  8. GNU CC is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 1, or (at your option)
  11. any later version.
  12.  
  13. GNU CC is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with GNU CC; see the file COPYING.  If not, write to
  20. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22.  
  23. /* This file defines all the MACHINE MODES used by GNU CC.
  24.  
  25.    A machine mode specifies a size and format of data
  26.    at the machine level.
  27.  
  28.    Each RTL expression has a machine mode.
  29.  
  30.    At the syntax tree level, each ..._TYPE and each ..._DECL node
  31.    has a machine mode which describes data of that type or the
  32.    data of the variable declared.  */
  33.  
  34. /* The first argument is the internal name of the machine mode
  35.    used in the C source.
  36.    By convention these are in UPPER_CASE, except for the word  "mode".
  37.  
  38.    The second argument  is the name of the machine mode in the
  39.    external ASCII format used for reading and printing RTL and trees.
  40.    By convention these names in UPPER_CASE.
  41.  
  42.    Third argument states the kind of representation:
  43.    MODE_INT - integer
  44.    MODE_FLOAT - floating
  45.    MODE_COMPLEX_INT - pair of integers
  46.    MODE_COMPLEX_FLOAT - pair of floats
  47.    MODE_FUNCTION - Algol or Pascal function-variable incl. static chain
  48.    MODE_RANDOM - anything else
  49.  
  50.    Fourth argument is the relative size of the object.
  51.    It is zero when the size is meaningless or not determined.
  52.    On most machines, this is also the actual size in bytes.
  53.    However, the general rule is that the size of SImode in bytes
  54.    is UNITS_PER_WORD and the other sizes are proportional to that.
  55.    (If UNITS_PER_WORD is less than 4, some modes would be less than
  56.    one byte.  Their sizes are rounded up to 1.)
  57.  
  58.    Fifth arg is the relative size of subunits of the object.
  59.    It is same as the fourth argument except for complexes and EPmode,
  60.    since they are really made of two equal size subunits.
  61.  
  62.    Sixth arg is next wider natural mode of the same class,
  63.    for widening multiply and narrowing divide.  0 if there is none.  */
  64.  
  65. /* The compiler assumes that a mode may be widened to another
  66.    HIGHER NUMBERED mode if both those modes AND ALL MODES IN BETWEEN
  67.    are in the same mode class.  Thus, you must should assign all
  68.    MODE_INT and MODE_FLOAT modes in separate contiguous blocks.  */
  69.  
  70. /* VOIDmode is used when no mode needs to be specified,
  71.    as for example on CONST_INT RTL expressions.  */
  72. DEF_MACHMODE (VOIDmode, "VOID", MODE_RANDOM, 0, 0, 0)
  73.  
  74. DEF_MACHMODE (QImode, "QI", MODE_INT, 1, 1, HImode)        /* int types */
  75. DEF_MACHMODE (HImode, "HI", MODE_INT, 2, 2, SImode)
  76. /* Pointers on some machines use this type to distinguish them from ints.
  77.    Useful if a pointer is 4 bytes but has some bits that are not significant,
  78.    so it is really not quite as wide as an integer.  */
  79. DEF_MACHMODE (PSImode, "PSI", MODE_INT, 4, 4, 0)
  80. DEF_MACHMODE (SImode, "SI", MODE_INT, 4, 4, DImode)
  81. DEF_MACHMODE (PDImode, "PDI", MODE_INT, 8, 8, 0)
  82. DEF_MACHMODE (DImode, "DI", MODE_INT, 8, 8, TImode)
  83. DEF_MACHMODE (TImode, "TI", MODE_INT, 16, 16, 0)
  84. DEF_MACHMODE (QFmode, "QF", MODE_FLOAT, 1, 1, 0)
  85. DEF_MACHMODE (HFmode, "HF", MODE_FLOAT, 2, 2, 0)    /* floating types */
  86. DEF_MACHMODE (SFmode, "SF", MODE_FLOAT, 4, 4, 0)
  87. DEF_MACHMODE (DFmode, "DF", MODE_FLOAT, 8, 8, 0)
  88. #ifdef APPLE_C
  89. /* Define the extended float mode, defaulting it to 10 bytes.  However,
  90.    the appropriate compiletime option will change the size to 12 bytes. */
  91. DEF_MACHMODE (XFmode, "XF", MODE_FLOAT, 10, 10, 0)  /* IEEE extended float */
  92. #else
  93. DEF_MACHMODE (XFmode, "XF", MODE_FLOAT, 12, 12, 0)  /* IEEE extended float */
  94. #endif /* APPLE_C */
  95. DEF_MACHMODE (TFmode, "TF", MODE_FLOAT, 16, 16, 0)
  96. DEF_MACHMODE (CQImode, "CQI", MODE_COMPLEX_INT, 2, 1, 0)
  97. DEF_MACHMODE (CHImode, "CHI", MODE_COMPLEX_INT, 4, 2, 0)  /* complex ints */
  98. DEF_MACHMODE (CSImode, "CSI", MODE_COMPLEX_INT, 8, 4, 0)
  99. DEF_MACHMODE (CDImode, "CDI", MODE_COMPLEX_INT, 16, 8, 0)
  100. DEF_MACHMODE (CTImode, "CTI", MODE_COMPLEX_INT, 32, 16, 0)
  101. DEF_MACHMODE (CQFmode, "CQF", MODE_COMPLEX_FLOAT, 2, 1, 0)
  102. DEF_MACHMODE (CHFmode, "CHF", MODE_COMPLEX_FLOAT, 4, 2, 0) /* complex floats */
  103. DEF_MACHMODE (CSFmode, "CSF", MODE_COMPLEX_FLOAT, 8, 4, 0)
  104. DEF_MACHMODE (CDFmode, "CDF", MODE_COMPLEX_FLOAT, 16, 8, 0)
  105. DEF_MACHMODE (CXFmode, "CXF", MODE_COMPLEX_FLOAT, 24, 12, 0)
  106. DEF_MACHMODE (CTFmode, "CTF", MODE_COMPLEX_FLOAT, 32, 16, 0)
  107.  
  108. /* BImode is used only in FIELD_DECL nodes for bit fields
  109.    whose size and alignment are not such as to fit any other mode.  */
  110. DEF_MACHMODE (BImode, "BI", MODE_INT, 0, 0, 0)    /* signed bit field */
  111.  
  112. /* BLKmode is used for structures, arrays, etc.
  113.    that fit no more specific mode.  */
  114. DEF_MACHMODE (BLKmode, "BLK", MODE_RANDOM, 0, 0, 0)
  115.  
  116. /* Function-variable that includes a static chain.  */
  117. DEF_MACHMODE (EPmode, "EP", MODE_RANDOM, 8, 4, 0)
  118.  
  119. /* The symbol Pmode stands for one of the above machine modes (usually SImode).
  120.    The tm file specifies which one.  It is not a distinct mode.  */
  121.  
  122. /*
  123. Local variables:
  124. mode:c
  125. version-control: t
  126. End:
  127. */
  128.